<pre>  /**
     */
    @Override
    protected Widget createTab() {
        VerticalPanel panel = new VerticalPanel();

        LabelTextBox field1 = new LabelTextBox("Champ obligatoire");
        field1.setMandatory(true);
        panel.add(field1);

        LabelTextBox field2 = new LabelTextBox("Validateur Mandatory");
        field2.addValidator(new MandatoryValidator&lt;String&gt;());
        panel.add(field2);

        LabelTextBox field3 = new LabelTextBox("Validateur Mandatory avec message personalisé");
        field3.addValidator(new MandatoryValidator&lt;String&gt;("Obligatoire"));
        panel.add(field3);

        LabelTextBox field4 = new LabelTextBox("Champ obligatoire avec message personalisé");
        field4.setMandatory(true);
        field4.setMandatoryErrorText("Obligatoire");
        panel.add(field4);

        LabelTextBox field5 = new LabelTextBox("Validation Alpha");
        field5.addValidator(new AlphaValidator());
        panel.add(field5);

        LabelTextBox field6 = new LabelTextBox("Validation nombre");
        field6.addValidator(new NumericValidator());
        panel.add(field6);

        LabelTextBox field7 = new LabelTextBox("Validation Alphanumérique");
        field7.addValidator(new AlphaNumericValidator());
        panel.add(field7);

        LabelTextBox field8 = new LabelTextBox("Validation par une liste de valeurs (a, b ou c)");
        field8.addValidator(new InArrayValidator&lt;String&gt;(Arrays.asList("a", "b", "c")));
        panel.add(field8);

        LabelTextBox field9 = new LabelTextBox("Longueur de la chaine");
        field9.addValidator(new StringLengthValidator(3, 3));
        panel.add(field9);

        LabelTextBox field10 = new LabelTextBox("Validateur perso");
        field10.addValidator(new Validator&lt;String&gt;() {
            @Override
            public String validate(String value) {
                if (value.startsWith("a"))
                    return "Ne doit pas commencer par la lettre a";
                return null;
            }
        });
        panel.add(field10);

        return panel;
    }

</pre>